import axios from '@/libs/api.request'

export class OrganizationApi {
  // 根据条件获取组织机构信息
  static getList (params) {
    return axios.request({
      url: '/Organization/GetList',
      method: 'post',
      enctype: 'multipart/form-data',
      data: params
    })
  }

  // 组织机构树列表
  static getTreeList (params) {
    return axios.request({
      url: '/Organization/GetTreeList',
      method: 'get',
      enctype: 'multipart/form-data',
      data: params
    })
  }

  // 历史调整信息
  static getLoggerList (params) {
    return axios.request({
      url: '/Organization/GetLoggerList',
      method: 'post',
      enctype: 'multipart/form-data',
      data: params
    })
  }

  // 根据ID获取组织机构信息
  static getModel (params) {
    return axios.request({
      url: '/Organization/GetModel',
      method: 'get',
      enctype: 'multipart/form-data',
      params: params
    })
  }

  // 调整上级组织信息页面
  static getUpdateParentModel (params) {
    return axios.request({
      url: '/Organization/GetUpdateParentModel',
      method: 'get',
      enctype: 'multipart/form-data',
      params: params
    })
  }

  // 保存组织机构信息
  static save (params) {
    return axios.request({
      url: '/Organization/Save',
      method: 'post',
      enctype: 'multipart/form-data',
      data: params
    })
  }

  // 调整上级组织信息
  static updateParent (params) {
    return axios.request({
      url: '/Organization/UpdateParent',
      method: 'post',
      enctype: 'multipart/form-data',
      data: params
    })
  }

  // 启用/禁用部门信息
  static enabledList (params) {
    return axios.request({
      url: '/Organization/EnabledList',
      method: 'post',
      enctype: 'multipart/form-data',
      data: params
    })
  }

  // 删除部门职位信息
  static delete (params) {
    return axios.request({
      url: '/Organization/Delete',
      method: 'post',
      enctype: 'multipart/form-data',
      data: params
    })
  }
}
